Repository navigation
Pass OAuth credentials per operation (breaking API change) - #22
Merged
Merged
Conversation
Contributor
Author
matnun-br
reviewed
Nov 3, 2026
Contributor
|
Only one minor comment the rest looks good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ShopifyOAuthClient currently requires client ID and secret constructor arguments even for operations that do not use both. Application-only token requests need no client secret, HMAC validation needs no client ID, and authorization URL construction needs no secret. Callers therefore have to supply irrelevant values or construct a partially configured client.
This change makes credential requirements explicit at each operation and leaves the instance responsible only for HTTP transport. One instance can serve multiple apps or rotated credentials without retaining app credentials in fields.
Public API changes
ShopifyOAuthClient(HttpClient httpClient = null).BuildAuthorizationUrlstatic and addclientIdas its first parameter.IsValidHmacstatic and addclientSecretafterqueryParameters.clientIdandclientSecretbefore the existing parameters on migration, refresh, ID-token exchange (online/offline), and authorization-code exchange (online/offline) methods.clientIdbefore the existing parameters onRequestClientAssertionAccessTokenAsync.IsValidShopDomain, response models, and exception types unchanged.These replace the existing signatures without compatibility overloads and are source/binary breaking changes. README examples include migration guidance; the type generator, test credential helper, and all repository callers are updated. Missing credentials are checked at the operation that requires them, before sending HTTP requests.
Validation
git diff --checkpassed; searched repository callers for old signatures.The HTTP/2 transport configuration is handled separately in #21.